package com.chinapost.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Twd entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TWD", schema = "YXJF")
public class Twd implements java.io.Serializable {

	// Fields

	private String cjgh;
	private Tdept tdept;
	private String cname;

	// Constructors

	/** default constructor */
	public Twd() {
	}

	/** full constructor */
	public Twd(String cjgh, Tdept tdept, String cname) {
		this.cjgh = cjgh;
		this.tdept = tdept;
		this.cname = cname;
	}

	// Property accessors
	@Id
	@Column(name = "CJGH", unique = true, nullable = false, length = 20)
	public String getCjgh() {
		return this.cjgh;
	}

	public void setCjgh(String cjgh) {
		this.cjgh = cjgh;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CDEPTID", nullable = false)
	public Tdept getTdept() {
		return this.tdept;
	}

	public void setTdept(Tdept tdept) {
		this.tdept = tdept;
	}

	@Column(name = "CNAME", nullable = false, length = 50)
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

}